﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace E1_eMart.admin
{
    public partial class comment_management : System.Web.UI.Page
    {
        protected List<Comment> listCM = new List<Comment>();
        protected void Page_Load(object sender, EventArgs e)
        {
            DataClasses1DataContext edata = new DataClasses1DataContext();
            listCM = edata.Comments.ToList<Comment>();

            //var groups = from cm in edata.Comments
            //             group cm by cm.MaSanPham into g
            //             select new { 
            //                 Tag = g.Key, 
            //                 Frequency = g.Count() 
            //             };

            ////var query = from cm in edata.Comments
            ////            orderby cm.MaSanPham;
            ////var query = list.GroupBy(cm => cm.MaSanPham);
            ////foreach (var cm in query)
            ////    listCM.Add(cm);
        }
    }
}